package rolesystem.agentlogic.utilityclasses;

import rolesystem.middle.parameters.DefaultParametersFile;

public class AgentLog 
{
	private long numberofMovements;
	
	private long objectCarried;
	
	private long timesAsManager;
	
	private long timesAsCollaborativeCarrier;
	
	private long lostObjects;
	
	public AgentLog()
	{
		numberofMovements=0;
		objectCarried=0;
		timesAsManager=0;
		timesAsCollaborativeCarrier=0;
		lostObjects=0;
	}
	
	public synchronized void setnumberofMovements(long numberofMovements)
	{
		this.numberofMovements=numberofMovements;
	}
	
	public synchronized void incnumberofMovements()
	{
		this.numberofMovements++;
	}
	
	public synchronized long getnumberofMovements()
	{
		return this.numberofMovements;
	}
	
	public synchronized void setobjectCarried(long objectCarried)
	{
		this.objectCarried=objectCarried;
	}
	
	public synchronized void incobjectCarried()
	{
		this.objectCarried++;
	}
	
	public synchronized long getobjectCarried()
	{
		return this.objectCarried;
	}
	
	public synchronized void settimesAsManager(long timesAsManager)
	{
		this.timesAsManager=timesAsManager;
	}
	
	public synchronized void inctimesAsManager()
	{
		this.timesAsManager++;
	}
	
	public synchronized long gettimesAsManager()
	{
		return this.timesAsManager;
	}
	
	public synchronized void settimesAsCollaborativeCarrier(long timesAsCollaborativeCarrier)
	{
		this.timesAsCollaborativeCarrier=timesAsCollaborativeCarrier;
	}
	
	public synchronized void inctimesAsCollaborativeCarrier()
	{
		this.timesAsCollaborativeCarrier++;
	}
	
	public synchronized long gettimesAsCollaborativeCarrier()
	{
		return this.timesAsCollaborativeCarrier;
	}
	
	public synchronized void setlostObjects(long lostObjects)
	{
		this.lostObjects=lostObjects;
	}
	
	public synchronized void inclostObjects()
	{
		this.lostObjects++;
	}
	
	public synchronized long getlostObjects()
	{
		return this.lostObjects;
	}
	
	public synchronized String getAllAsString()
	{
		String returnString;
		
		returnString= this.getnumberofMovements() + DefaultParametersFile.data_separator
					  + this.getobjectCarried() + DefaultParametersFile.data_separator
					  + this.gettimesAsManager() + DefaultParametersFile.data_separator 
					  + this.gettimesAsCollaborativeCarrier() + DefaultParametersFile.data_separator
					  + this.getlostObjects();
		
		return returnString;
	}
	
	
	
}
